generated from cloudnative-pg/cnpg-template
-
Notifications
You must be signed in to change notification settings - Fork 20
feat: Make CREATE EXTENSION tests optional #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mbiagetti
wants to merge
7
commits into
cloudnative-pg:main
Choose a base branch
from
mbiagetti:mbiagetti/dev/85
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+157
−50
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8eef786 to
0c185f5
Compare
mbiagetti
commented
Jan 29, 2026
60a3587 to
26b1448
Compare
NiccoloFei
approved these changes
Feb 5, 2026
GabriFedi97
approved these changes
Feb 9, 2026
c6c4a76 to
cc2f50c
Compare
Signed-off-by: Matteo <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
cc2f50c to
b055ea9
Compare
gbartolini
reviewed
Feb 9, 2026
Signed-off-by: Gabriele Bartolini <[email protected]>
Contributor
|
I have tried this patch using an extension that doesn't need apiVersion: postgresql.cnpg.io/v1
kind: Database
metadata:
name: (join('-', [$values.name, 'app']))
spec:
name: app
owner: app
cluster:
name: ($values.name)
extensions: ($values.database_config.extensions_spec)In my opinion, this test should be skipped or, if we want to, we should use a template that adds the |
TestingValues was missing the CreateExtension field, so the generated values.yaml never contained create_extension, causing the psql verification job to always skip. Closes cloudnative-pg#85 Signed-off-by: Marco Nenciarini <[email protected]>
…gistry calls Bundle extension metadata with its configuration so generateDatabaseConfig no longer re-parses metadata or re-fetches image annotations for each extension. Signed-off-by: Marco Nenciarini <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
is false Instead of listing extensions with ensure: absent in the Database CR, skip them entirely from the extensions spec and expected status. This avoids creating unnecessary extension entries in the Database CR for library-only images like wal2json that don't provide a formal Postgres extension object. When all extensions have create_extension = false, both extensions_spec and expected_status are omitted from the generated values, causing the Database CR to have no extensions field and the assertion to expect no extension status. Signed-off-by: Marco Nenciarini <[email protected]>
mnencia
approved these changes
Feb 11, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a
create_extensionboolean field to extension metadata so that extensions providing only libraries or tools (e.g. wal2json) can skipCREATE EXTENSIONtests. Whencreate_extensionisfalse, the extension is omitted entirely from the Database CR'sextensions_specand the status assertion skips theextensionsfield.The generated
database_assert_statusmap conditionally includes or excludes theextensionskey, avoiding the Chainsaw limitation whereextensions: nullwould require the field to exist in the actual resource. The psql verification job incheck-extension.yamlalso readscreate_extensionand skips when false.Example generated values for
create_extension: true(pgvector):Example generated values for
create_extension: false(wal2json):Closes #85